<template>
  <div class="app-container">
    <el-container v-if="app.isPc">
      <el-header>
        <Menu/>
      </el-header>
      <transition name="router-fade" mode="out-in">
        <keep-alive>
          <router-view v-if="$route.meta.keepAlive"></router-view>
        </keep-alive>
      </transition>
      <transition name="router-fade" mode="out-in">
        <router-view v-if="!$route.meta.keepAlive"></router-view>
      </transition>
      <el-footer>
        @2018 LVMH
      </el-footer>
    </el-container>
    <div v-else>
      <transition name="router-fade" mode="out-in">
        <keep-alive>
          <router-view v-if="$route.meta.keepAlive"></router-view>
        </keep-alive>
      </transition>
      <transition name="router-fade" mode="out-in">
        <router-view v-if="!$route.meta.keepAlive"></router-view>
      </transition>
      <MenuMb/>
    </div>
  </div>
</template>

<script>
  import {mapState} from 'vuex'
  import Menu from '../../components/menu/Menu.vue'
  import MenuMb from '../../components/menu/MenuMb.vue'
  import ResizeMixin from './mixin/ResizeHandler'

  export default {
    name: 'Nav',
    data(){
      return {
        goods: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
      }
    },
    mixins: [ResizeMixin],
    components: {
      Menu, MenuMb
    },
    mounted() {

    },
    computed: {
      ...mapState([
        'app'
      ])
    }
    ,
    methods: {}
  }
</script>

<style scoped>
  .app-container {
    background: #f0f0f0;
  }
</style>
